<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加区域信息</title>
    <style type="text/css">

        label {width: 10em; margin-right: 1em; text-align: right; }

        form div{
            padding-top: 20px;
        }
    </style>
</head>
<body >
<div style="text-align: center;">
    <h1 >添加设备信息</h1>
    <form th:action="@{/area/save}" method="post">
        <div>
            <label>区域编码:</label>
            <input type="text" name="areaCode" th:field="${area.areaCode}"/>
        </div>
        <div>
            <label>区域名称:</label>
            <input type="text" name="areaName" th:field="${area.areaName}"/>
        </div>
        <span>机组名称:</span>
        <select name="unitId">
            <option th:each="un : ${un}" th:selected="${area.unitId eq un.id}" name="id" th:value="${un.id}" th:text="${un.unitName}"></option>
        </select>

        <div style="text-align: center">
            <input type="submit" value="提交" />
        </div>
    </form>

</div>

</body>
</html>